home *** CD-ROM | disk | FTP | other *** search
/ Aminet 23 / Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso / Aminet / text / misc / micronote.lha / オNote / Source / Note_cat.c < prev    next >
C/C++ Source or Header  |  1996-12-27  |  3KB  |  92 lines

  1. /****************************************************************
  2.    This file was created automatically by `FlexCat 1.5'
  3.    from "Note.cd".
  4.  
  5.    Do NOT edit by hand!
  6. ****************************************************************/
  7.  
  8. #if defined(__SASC)  ||  defined(_DCC)
  9. #include <proto/locale.h>
  10. #elif defined(__GNUC__)
  11. #include <inline/locale.h>
  12. #else
  13. #include <clib/locale_protos.h>
  14. #endif
  15.  
  16.  
  17.  
  18.  
  19. static LONG Note_Version = 0;
  20. static const STRPTR Note_BuiltInLanguage = (STRPTR) "english";
  21.  
  22. struct FC_Type
  23. {   LONG   ID;
  24.     STRPTR Str;
  25. };
  26.  
  27.  
  28. const struct FC_Type _msgAppDesc = { 0, "little Notepad" };
  29. const struct FC_Type _msgAboutTitle = { 1, "About µNote..." };
  30. const struct FC_Type _msgAboutButton = { 2, "* _Smile " };
  31. const struct FC_Type _msgAbout = { 3, "\033c\033bµNote\033n\n\n"\
  32.     "©1996 Daniel Hirscher\n"\
  33.     "hirscher@fl-sun00.fbe.fh-weingarten.de\n"\
  34.     "e-mailware\n"\
  35.     "a latenight & daylight production\n"\
  36.     "4U!" };
  37. const struct FC_Type _msgSchieber = { 4, "Scroller to scroll the text." };
  38. const struct FC_Type _msgMDrucken = { 5, "Print" };
  39. const struct FC_Type _msgMDruckenSC = { 6, "P" };
  40. const struct FC_Type _msgMAbout = { 7, "About..." };
  41. const struct FC_Type _msgMAboutM = { 8, "About MUI..." };
  42. const struct FC_Type _msgMQuit = { 9, "Quit" };
  43. const struct FC_Type _msgMSettings = { 10, "Settings" };
  44. const struct FC_Type _msgMSettingsM = { 11, "MUI..." };
  45.  
  46.  
  47. static struct Catalog *Note_Catalog = NULL;
  48.  
  49. void OpenNoteCatalog(struct Locale *loc, STRPTR language)
  50. { LONG tag, tagarg;
  51.   extern struct Library *LocaleBase;
  52.   extern void CloseNoteCatalog(void);
  53.  
  54.   CloseNoteCatalog(); /* Not needed if the programmer pairs OpenNoteCatalog
  55.                        and CloseNoteCatalog right, but does no harm.  */
  56.  
  57.   if (LocaleBase != NULL  &&  Note_Catalog == NULL)
  58.   { if (language == NULL)
  59.     { tag = TAG_IGNORE;
  60.     }
  61.     else
  62.     { tag = OC_Language;
  63.       tagarg = (LONG) language;
  64.     }
  65.     Note_Catalog = OpenCatalog(loc, (STRPTR) "Note.catalog",
  66.                                 OC_BuiltInLanguage, Note_BuiltInLanguage,
  67.                                 tag, tagarg,
  68.                                 OC_Version, Note_Version,
  69.                                 TAG_DONE);
  70.   }
  71. }
  72.  
  73. void CloseNoteCatalog(void)
  74. {
  75.   extern struct Library *LocaleBase;
  76.  if (LocaleBase != NULL)
  77.   { CloseCatalog(Note_Catalog);
  78.   }
  79.   Note_Catalog = NULL;
  80. }
  81.  
  82. STRPTR GetNoteString(APTR fcstr)
  83. { STRPTR defaultstr;
  84.   LONG strnum;
  85.  
  86.   strnum = ((struct FC_Type *) fcstr)->ID;
  87.   defaultstr = ((struct FC_Type *) fcstr)->Str;
  88.  
  89.   return(Note_Catalog ? GetCatalogStr(Note_Catalog, strnum, defaultstr) :
  90.                       defaultstr);
  91. }
  92.